package com.ruoyi.project.modules.interfaceinfo.mapper;

import java.util.List;
import com.ruoyi.project.modules.interfaceinfo.domain.InterfaceInfo;
import com.ruoyi.project.modules.interfaceinfo.request.ListInterfaceFieldParamReq;
import com.ruoyi.project.modules.interfaceinfo.vo.InterfaceParam;
import com.ruoyi.project.modules.table.domain.FieldInfo;
import com.ruoyi.project.modules.table.domain.TableInfo;
import com.ruoyi.project.modules.usage.domain.Usage;
import org.apache.ibatis.annotations.Param;

/**
 * 实体用况Mapper接口
 * 
 * @author smallrain
 * @date 2021-10-29
 */
public interface InterfaceInfoMapper 
{
    /**
     * 查询实体用况
     * 
     * @param id 实体用况主键
     * @return 实体用况
     */
    public InterfaceInfo selectInterfaceInfoById(Long id);

    /**
     * 查询实体用况列表
     * 
     * @param interfaceInfo 实体用况
     * @return 实体用况集合
     */
    public List<InterfaceInfo> selectInterfaceInfoList(InterfaceInfo interfaceInfo);
    public List<InterfaceInfo> selectInterfaceInfoList2(InterfaceInfo interfaceInfo);

    List<InterfaceInfo> selectInterfaceInfoByIds(@Param("ids") List<Long> ids);

    /**
     * 新增实体用况
     * 
     * @param interfaceInfo 实体用况
     * @return 结果
     */
    public int insertInterfaceInfo(InterfaceInfo interfaceInfo);

    /**
     * 修改实体用况
     * 
     * @param interfaceInfo 实体用况
     * @return 结果
     */
    public int updateInterfaceInfo(InterfaceInfo interfaceInfo);

    /**
     * 删除实体用况
     * 
     * @param id 实体用况主键
     * @return 结果
     */
    public int deleteInterfaceInfoById(Long id);

    /**
     * 批量删除实体用况
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInterfaceInfoByIds(String[] ids);

    List<InterfaceInfo> selectSubInterfaces(@Param("interfaceId") Long interfaceId);

    List<Usage> selectUsageList(@Param("ids") List<Long> ids);

    List<InterfaceParam> listFieldParam(@Param("interfaceType") String interfaceType, @Param("interfaceId") Long interfaceId, @Param("paramType") String paramType);

    List<InterfaceParam> listParams(@Param("interfaceType") String interfaceType, @Param("interfaceId") Long interfaceId, @Param("paramType") String paramType);

    List<FieldInfo> fieldList(@Param("interfaceType") String interfaceType, @Param("interfaceId") Long interfaceId, @Param("paramType") String paramType);

    List<TableInfo> tableList(@Param("interfaceType") String interfaceType, @Param("interfaceId") Long interfaceId);

    List<InterfaceInfo> dubboList(@Param("interfaceInfo") InterfaceInfo interfaceInfo);

    List<InterfaceParam> listInterfaceFieldParam(@Param("listInterfaceFieldParamReq") ListInterfaceFieldParamReq listInterfaceFieldParamReq);
    List<InterfaceParam> listInterfaceParams(@Param("listInterfaceFieldParamReq") ListInterfaceFieldParamReq listInterfaceFieldParamReq);
    List<InterfaceParam> listInterfaceParamsField(@Param("listInterfaceFieldParamReq") ListInterfaceFieldParamReq listInterfaceFieldParamReq);

    List<InterfaceInfo> usedInterfaceList(@Param("interfaceId") Long id);

    List<InterfaceParam> listVirtualUsageFieldParam(@Param("interfaceType") String interfaceType, @Param("interfaceId") Long interfaceId, @Param("processBranchId") Long processBranchId, @Param("virtualUsageGroupId") Long virtualUsageGroupId);

    List<InterfaceParam> listVirtualUsageParams(@Param("interfaceType") String interfaceType, @Param("interfaceId") Long interfaceId, @Param("processBranchId") Long processBranchId, @Param("virtualUsageGroupId") Long virtualUsageGroupId);

    List<InterfaceParam> paramRequiredList(@Param("type") String type, @Param("interfaceInfoId") Long interfaceInfoId,@Param("isInParam")  String isInParam);

    void batchUpdateInterface(@Param("interfaceIds") List<Long> interfaceIds, @Param("lifeCycle") String lifeCycle);

    List<InterfaceInfo> selectInterfaceInfoList3(@Param("pageIds") List<Long> pageIds);
}
